/** layuiAdmin.pro-v1.2.1 LPPL License By http://www.layui.com/admin/ */
;
layui.define(["table", "form"],
    function(e) {
        var $ = layui.$,
            i = (layui.$, layui.admin),
            t = layui.view,
            l = layui.table,
            r = layui.form;
        var sale_id = 0;
        if(layui.params && layui.params.id){
            sale_id = layui.params.id;
            layui.sale_id = sale_id;
            layui.params = {};
        }
        l.render({
            elem: "#LAY-saleusers-manage",
            url: layui.setter.baseUrl+"sale/users?id="+sale_id,
            cols: [[{
                field: "nickname",
                title: "用户",
            },
                {
                    field: "mobile",
                    title: "手机号",
                },
                {
                    field: "createtime",
                    title: "参与时间",
                },
                {
                    title: "视频数据",
                    align: "center",
                    fixed: "right",
                    toolbar: "#table-sale-users-oper"
                }]],
            page: !0,
            limit: 10,
            text: {
                none: '暂无相关数据' //默认：无数据。注：该属性为 layui 2.2.5 开始新增
            }
        }),
            l.on("tool(LAY-saleusers-manage)",
                function(e) {
                    var l = e.data;
                    if("itemdata" === e.event){
                        i.popup({
                            title: "视频数据",
                            area: [$(window).width()*0.618+'px', $(window).height()*0.9+'px'],
                            id: "LAY-popup-sale-video-data",
                            success: function(e, i) {
                                t(this.id).render("sale/videodata", l);
                            }
                        })
                    }
                }),
            e("saleusers", {})
    });